tool
extends EditorScript


func _run():
	pass
	
	var popup = PopupMenu.new()
	popup.add_item("test1")
	popup.add_item("test2")
	popup.add_item("test3")
	get_editor_interface().get_editor_viewport().add_child(popup)
	
	var pos = get_editor_interface().get_editor_viewport().get_global_mouse_position()
	popup.rect_global_position = pos
	popup.popup()
	
	yield(get_editor_interface().get_tree().create_timer(1.0), "timeout")
	popup.queue_free()


